using UnityEngine;
using System.Collections;

public class Leaf2D
{
    public Vector3 location;
    public int closestBranchId;
    public GameObject cube;
    public bool influential;

    // Growth variables
    public bool active;
    public Branch2D closestBranch;
    public float distance;
    public bool affected;

    public Leaf2D(Vector3 position)
    {
        location = position;
        influential = true;

        active = true;
        closestBranch = null;
        distance = float.MaxValue;
    }

    public void Draw()
    {
        cube = GameObject.CreatePrimitive(UnityEngine.PrimitiveType.Cube);
        cube.transform.position = location;
        cube.transform.localScale = new Vector3(.1f, .1f, .1f);
        cube.renderer.material.color = Color.green;
    }

    public void Clean()
    {
        //Destroy(cube);
    }
}
